3.4.53 \(\int \frac {\cos (c+d x) (B \sec (c+d x)+C \sec ^2(c+d x))}{(a+a \sec (c+d x))^3} \, dx\) [353]

3.4.53.1 Optimal result
3.4.53.2 Mathematica [B] (verified)
3.4.53.3 Rubi [A] (verified)
3.4.53.4 Maple [A] (verified)
3.4.53.5 Fricas [A] (verification not implemented)
3.4.53.6 Sympy [F]
3.4.53.7 Maxima [A] (verification not implemented)
3.4.53.8 Giac [A] (verification not implemented)
3.4.53.9 Mupad [B] (verification not implemented)

3.4.53.1 Optimal result

Integrand size = 38, antiderivative size = 108 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {B x}{a^3}-\frac {(B-C) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(7 B-2 C) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {2 (11 B-C) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )} \]

output
B*x/a^3-1/5*(B-C)*tan(d*x+c)/d/(a+a*sec(d*x+c))^3-1/15*(7*B-2*C)*tan(d*x+c 
)/a/d/(a+a*sec(d*x+c))^2-2/15*(11*B-C)*tan(d*x+c)/d/(a^3+a^3*sec(d*x+c))
 
3.4.53.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(241\) vs. \(2(108)=216\).

Time = 1.05 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.23 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^5\left (\frac {1}{2} (c+d x)\right ) \left (150 B d x \cos \left (\frac {d x}{2}\right )+150 B d x \cos \left (c+\frac {d x}{2}\right )+75 B d x \cos \left (c+\frac {3 d x}{2}\right )+75 B d x \cos \left (2 c+\frac {3 d x}{2}\right )+15 B d x \cos \left (2 c+\frac {5 d x}{2}\right )+15 B d x \cos \left (3 c+\frac {5 d x}{2}\right )-370 B \sin \left (\frac {d x}{2}\right )+80 C \sin \left (\frac {d x}{2}\right )+270 B \sin \left (c+\frac {d x}{2}\right )-60 C \sin \left (c+\frac {d x}{2}\right )-230 B \sin \left (c+\frac {3 d x}{2}\right )+40 C \sin \left (c+\frac {3 d x}{2}\right )+90 B \sin \left (2 c+\frac {3 d x}{2}\right )-30 C \sin \left (2 c+\frac {3 d x}{2}\right )-64 B \sin \left (2 c+\frac {5 d x}{2}\right )+14 C \sin \left (2 c+\frac {5 d x}{2}\right )\right )}{480 a^3 d} \]

input
Integrate[(Cos[c + d*x]*(B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + a*Sec[c 
+ d*x])^3,x]
 
output
(Sec[c/2]*Sec[(c + d*x)/2]^5*(150*B*d*x*Cos[(d*x)/2] + 150*B*d*x*Cos[c + ( 
d*x)/2] + 75*B*d*x*Cos[c + (3*d*x)/2] + 75*B*d*x*Cos[2*c + (3*d*x)/2] + 15 
*B*d*x*Cos[2*c + (5*d*x)/2] + 15*B*d*x*Cos[3*c + (5*d*x)/2] - 370*B*Sin[(d 
*x)/2] + 80*C*Sin[(d*x)/2] + 270*B*Sin[c + (d*x)/2] - 60*C*Sin[c + (d*x)/2 
] - 230*B*Sin[c + (3*d*x)/2] + 40*C*Sin[c + (3*d*x)/2] + 90*B*Sin[2*c + (3 
*d*x)/2] - 30*C*Sin[2*c + (3*d*x)/2] - 64*B*Sin[2*c + (5*d*x)/2] + 14*C*Si 
n[2*c + (5*d*x)/2]))/(480*a^3*d)
 
3.4.53.3 Rubi [A] (verified)

Time = 0.79 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.09, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 4560, 3042, 4410, 25, 3042, 4410, 25, 3042, 4407, 3042, 4281}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a \sec (c+d x)+a)^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\)

\(\Big \downarrow \) 4560

\(\displaystyle \int \frac {B+C \sec (c+d x)}{(a \sec (c+d x)+a)^3}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {B+C \csc \left (c+d x+\frac {\pi }{2}\right )}{\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\)

\(\Big \downarrow \) 4410

\(\displaystyle -\frac {\int -\frac {5 a B-2 a (B-C) \sec (c+d x)}{(\sec (c+d x) a+a)^2}dx}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {5 a B-2 a (B-C) \sec (c+d x)}{(\sec (c+d x) a+a)^2}dx}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {5 a B-2 a (B-C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 4410

\(\displaystyle \frac {-\frac {\int -\frac {15 a^2 B-a^2 (7 B-2 C) \sec (c+d x)}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {a (7 B-2 C) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\int \frac {15 a^2 B-a^2 (7 B-2 C) \sec (c+d x)}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {a (7 B-2 C) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int \frac {15 a^2 B-a^2 (7 B-2 C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}-\frac {a (7 B-2 C) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 4407

\(\displaystyle \frac {\frac {15 a B x-2 a^2 (11 B-C) \int \frac {\sec (c+d x)}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {a (7 B-2 C) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {15 a B x-2 a^2 (11 B-C) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}-\frac {a (7 B-2 C) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

\(\Big \downarrow \) 4281

\(\displaystyle \frac {\frac {15 a B x-\frac {2 a^2 (11 B-C) \tan (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (7 B-2 C) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

input
Int[(Cos[c + d*x]*(B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + a*Sec[c + d*x] 
)^3,x]
 
output
-1/5*((B - C)*Tan[c + d*x])/(d*(a + a*Sec[c + d*x])^3) + (-1/3*(a*(7*B - 2 
*C)*Tan[c + d*x])/(d*(a + a*Sec[c + d*x])^2) + (15*a*B*x - (2*a^2*(11*B - 
C)*Tan[c + d*x])/(d*(a + a*Sec[c + d*x])))/(3*a^2))/(5*a^2)
 

3.4.53.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4281
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo 
l] :> Simp[-Cot[e + f*x]/(f*(b + a*Csc[e + f*x])), x] /; FreeQ[{a, b, e, f} 
, x] && EqQ[a^2 - b^2, 0]
 

rule 4407
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
 (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a   Int[Csc[e + f* 
x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c 
- a*d, 0]
 

rule 4410
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d 
_.) + (c_)), x_Symbol] :> Simp[(-(b*c - a*d))*Cot[e + f*x]*((a + b*Csc[e + 
f*x])^m/(b*f*(2*m + 1))), x] + Simp[1/(a^2*(2*m + 1))   Int[(a + b*Csc[e + 
f*x])^(m + 1)*Simp[a*c*(2*m + 1) - (b*c - a*d)*(m + 1)*Csc[e + f*x], x], x] 
, x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && 
EqQ[a^2 - b^2, 0] && IntegerQ[2*m]
 

rule 4560
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. 
)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) 
*(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2   Int[(a + b*Csc[e + f*x])^(m 
+ 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ 
[{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
 
3.4.53.4 Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.64

method result size
parallelrisch \(\frac {3 \left (-B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+10 \left (2 B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+15 \left (-7 B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+60 B x d}{60 a^{3} d}\) \(69\)
derivativedivides \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}+\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +8 B \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) \(102\)
default \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}+\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +8 B \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) \(102\)
risch \(\frac {B x}{a^{3}}-\frac {2 i \left (45 B \,{\mathrm e}^{4 i \left (d x +c \right )}-15 C \,{\mathrm e}^{4 i \left (d x +c \right )}+135 B \,{\mathrm e}^{3 i \left (d x +c \right )}-30 C \,{\mathrm e}^{3 i \left (d x +c \right )}+185 B \,{\mathrm e}^{2 i \left (d x +c \right )}-40 C \,{\mathrm e}^{2 i \left (d x +c \right )}+115 B \,{\mathrm e}^{i \left (d x +c \right )}-20 C \,{\mathrm e}^{i \left (d x +c \right )}+32 B -7 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) \(133\)
norman \(\frac {\frac {B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{a}-\frac {B x}{a}-\frac {\left (B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{20 a d}-\frac {\left (2 B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}+\frac {\left (2 B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 a d}+\frac {\left (7 B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}-\frac {\left (17 B -2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{10 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) a^{2}}\) \(186\)

input
int(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3,x,method=_ 
RETURNVERBOSE)
 
output
1/60*(3*(-B+C)*tan(1/2*d*x+1/2*c)^5+10*(2*B-C)*tan(1/2*d*x+1/2*c)^3+15*(-7 
*B+C)*tan(1/2*d*x+1/2*c)+60*B*x*d)/a^3/d
 
3.4.53.5 Fricas [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.28 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {15 \, B d x \cos \left (d x + c\right )^{3} + 45 \, B d x \cos \left (d x + c\right )^{2} + 45 \, B d x \cos \left (d x + c\right ) + 15 \, B d x - {\left ({\left (32 \, B - 7 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (17 \, B - 2 \, C\right )} \cos \left (d x + c\right ) + 22 \, B - 2 \, C\right )} \sin \left (d x + c\right )}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]

input
integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3,x, a 
lgorithm="fricas")
 
output
1/15*(15*B*d*x*cos(d*x + c)^3 + 45*B*d*x*cos(d*x + c)^2 + 45*B*d*x*cos(d*x 
 + c) + 15*B*d*x - ((32*B - 7*C)*cos(d*x + c)^2 + 3*(17*B - 2*C)*cos(d*x + 
 c) + 22*B - 2*C)*sin(d*x + c))/(a^3*d*cos(d*x + c)^3 + 3*a^3*d*cos(d*x + 
c)^2 + 3*a^3*d*cos(d*x + c) + a^3*d)
 
3.4.53.6 Sympy [F]

\[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]

input
integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)**2)/(a+a*sec(d*x+c))**3,x)
 
output
(Integral(B*cos(c + d*x)*sec(c + d*x)/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 
 + 3*sec(c + d*x) + 1), x) + Integral(C*cos(c + d*x)*sec(c + d*x)**2/(sec( 
c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x))/a**3
 
3.4.53.7 Maxima [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.48 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {B {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} - \frac {C {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \]

input
integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3,x, a 
lgorithm="maxima")
 
output
-1/60*(B*((105*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d* 
x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 120*arctan(si 
n(d*x + c)/(cos(d*x + c) + 1))/a^3) - C*(15*sin(d*x + c)/(cos(d*x + c) + 1 
) - 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c 
) + 1)^5)/a^3)/d
 
3.4.53.8 Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.12 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\frac {60 \, {\left (d x + c\right )} B}{a^{3}} - \frac {3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 20 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 10 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]

input
integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3,x, a 
lgorithm="giac")
 
output
1/60*(60*(d*x + c)*B/a^3 - (3*B*a^12*tan(1/2*d*x + 1/2*c)^5 - 3*C*a^12*tan 
(1/2*d*x + 1/2*c)^5 - 20*B*a^12*tan(1/2*d*x + 1/2*c)^3 + 10*C*a^12*tan(1/2 
*d*x + 1/2*c)^3 + 105*B*a^12*tan(1/2*d*x + 1/2*c) - 15*C*a^12*tan(1/2*d*x 
+ 1/2*c))/a^15)/d
 
3.4.53.9 Mupad [B] (verification not implemented)

Time = 15.92 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.23 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {B\,x}{a^3}+\frac {{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {B\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}-\frac {C\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}\right )-{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {7\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}-\frac {C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}\right )-\frac {B\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}+\frac {C\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}}{a^3\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5} \]

input
int((cos(c + d*x)*(B/cos(c + d*x) + C/cos(c + d*x)^2))/(a + a/cos(c + d*x) 
)^3,x)
 
output
(B*x)/a^3 + (cos(c/2 + (d*x)/2)^2*((B*sin(c/2 + (d*x)/2)^3)/3 - (C*sin(c/2 
 + (d*x)/2)^3)/6) - cos(c/2 + (d*x)/2)^4*((7*B*sin(c/2 + (d*x)/2))/4 - (C* 
sin(c/2 + (d*x)/2))/4) - (B*sin(c/2 + (d*x)/2)^5)/20 + (C*sin(c/2 + (d*x)/ 
2)^5)/20)/(a^3*d*cos(c/2 + (d*x)/2)^5)